# coding=utf-8
# @Time: 2023/2/15 23:00
# @Author: zyg
# email: zhaoyiguang@lecent.cn
from selenium.webdriver.common.by import By

from base.ObjectMap import ObjectMap
from base.DelGoodsBase import DelGoodsBase
from logs.log import log


class DelGoodsPage(ObjectMap, DelGoodsBase):
    def click_del_good_button(self, driver, button_name):
        """
        点击删除按钮
        :param driver:
        :param driver:
        :return:button_name
        """
        log.info("点击" + button_name + "按钮")
        button_xpath = self.del_good_button(button_name)
        return self.element_click(driver, By.XPATH, button_xpath)
